<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>管理员登录</title>
    <link href="{{ asset("/assets/css/style.css") }}" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src={{ asset("/assets/js/jquery-1.11.2.min.js")}}></script>
    <script type="text/javascript">
        $(function () {
            //检测IE
            if (!-[1,]) {
                window.location.href = '/ie6update.html';
            }
            $("#btnSubmit").click(function () {
                var getStr = $("#form1").serialize();
                $.get(
                    "{{ path("doAdminLogin") }}?"+ getStr,
                    function (data) {
                        if (data.s == 0) {
                            alert(data.i);
                            $("#msgtip").text(data.i);
                        }else if (data.s == 1) {
                            location.href = "{{ path("adminHomePage") }}";
                        }
                    }
                );
            });
        });
    </script>
</head>

<body class="loginbody">
<form id="form1">
    <div class="login-wrap">
        <div class="login-logo">LOGO</div>
        <div class="login-form">
            <div class="col">
                <input name="n" type="text" value="demo" id="txtUserName" class="login-input" placeholder="管理员账号" title="管理员账号" />
                <label class="icon user" for="txtUserName"></label>
            </div>
            <div class="col">
                <input name="p" type="password" id="txtPassword" class="login-input" placeholder="管理员密码" title="管理员密码" />
                <label class="icon pwd" for="txtPassword"></label>
            </div>
            <div class="col">
                <input type="button" name="btnSubmit" value="登 录" id="btnSubmit" class="login-btn" />
            </div>
        </div>
        <div class="login-tips"><i></i><p id="msgtip"></p></div>
    </div>

    <div class="copy-right">
        <p>版权所有</p>
    </div>
</form>
</body>
</html>
